#ifndef __CT_PRL_H__
#define __CT_PRL_H__

#include <stdio.h>

#include "base.h"

void execCommand(unsigned char* pCommand,int length);

void update(int position, unsigned char* pData, int length);
void moveBytes(int forwardStep,unsigned char* pData, int startPos, int length);
unsigned char moveBits(int forwardStep,unsigned char* pData, int startPos, int length);
void commit(unsigned char* pData, int length, FILE* fp);

int getBit(unsigned char* pData, int pos);
void setBit(unsigned char* pData, int pos, int value);
void parsePRL(unsigned char* pData, int length);
int getBits(unsigned char* pData, int start, int length, unsigned char* pOut);
int getIntFromBits(unsigned char* pData, int start, int length);

#endif
